package com.wang.mall.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "product")
public class Product implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 商品名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 商品标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 库存数量
     */
    @TableField(value = "stock")
    private Long stock;

    /**
     * 锁定库存数
     */
    @TableField(value = "lock_stock")
    private Long lockStock;

    /**
     * 价格
     */
    @TableField(value = "price")
    private BigDecimal price;


    /**
     * 0 秒杀商品,页面不进行展示  1 正常商品,页面进行展示
     */
//    @TableLogic
    @TableField(value = "status")
    private Integer status;

    private static final long serialVersionUID = 1L;


    /**
     * 商品图片
     */
    @TableField(exist = false)
    private List<ProductImage> imageList;
}
